﻿@using BonjourQuotation.UI.Models.AccountModel
@model ToolTabColumnPermisionsCanViewCanEditHasFilterGridViewModel

@if (Model.Message != null)
{
    @Html.LabelForModel(Model.Message)
}
@Html.HiddenFor(model => model.ProfileID)
@Html.HiddenFor(model => model.ToolTabFixedColumnCountID, new { @id = "ProfileToolTabFixedColumnCountID" })
@Html.HiddenFor(model => model.ToolTabID, new { @id = "ProfileToolTabID" })
@Html.HiddenFor(model => model.ToolID, new { @id = "ProfileToolID" })
@Html.HiddenFor(model => model.Rows.Count)

<div style="float: left; margin-left: 30px; margin-top: 20px;width:80px;height:20px;" class="label_pointercursor" id="ProfileManualLineNoDiv">
    <input type="checkbox" class="table_inputs_checkbox" style="float:left;" name="ProfileManualLineNoCheckbox" id="ProfileManualLineNoCheckbox">
    <span class="table_inputs_30" style="float: left; font-size: 12px; margin-top: 3px; ">Manual</span>
</div>
<div class=" col-lg-4" id="ProfileFixedColumnCountDiv">
    <div class="input-group">
        <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.FixedColumnCount)</span>
        @Html.TextBoxFor(model => model.FixedColumnCount, new { @class = "table_inputs_SmallPadding2 inpputgr form-control ProfileToolElemnetsChange number GridElementsChange", @id = "ProfileFixedColumnCount" })
    </div>
</div>
    <div style="width: 581px; min-height: 20px; max-height: 360px; margin: auto; padding-top: 150px; padding-bottom: 10px; ">
    <table class="table table-bordered table-hover table-condensed" id="ProfileHasFilterHeader" style="margin-bottom: -1px !important; width: 560px; background-color: white;">
        <tr>
            <th width=10%; class="GridHeaders">
                <span class="table_inputs_120">№</span>
                <div style="width: 44px; height: 18px;" class="label_pointercursor" id="ProfileClearLineNumDiv">
                    <input type="checkbox" class="table_inputs_20" style="float:left;" disabled="disabled" name="ProfileClearLineNoCheckbox" id="ProfileClearLineNoCheckbox">
                    <span class="table_inputs_15" style="float: left; font-size: 10px; margin-top: 3px; ">Clear</span>
                </div>
            </th>
            <th width=42%; class="GridHeaders">Tool Tab Column Name</th>
            <th width=16%; class="GridHeaders ProfileAllowViewth label_pointercursor">
                <span class="table_inputs_120">Allow View</span>
                <input type="checkbox" class="table_inputs_checkbox" name="ProfileAllowViewCheckbox" id="ProfileAllowViewCheckbox">
            </th>
            <th width=16%; class="GridHeaders ProfileAllowEditth label_pointercursor">
                <span class="table_inputs_120">Allow Edit</span>
                <input type="checkbox" class="table_inputs_checkbox" name="ProfileAllowEditCheckbox" id="ProfileAllowEditCheckbox">
            </th>
            <th width=16%; class="GridHeaders ProfileHasFilterth label_pointercursor">
                <span class="table_inputs_120">Has Filter</span>
                <input type="checkbox" class="table_inputs_checkbox" style="margin-left: -2px;" name="ProfileHasFilterCheckbox" id="ProfileHasFilterCheckbox">
            </th>
        </tr>
    </table>
    <div style="height:310px; overflow-y:auto">
        <table class="table table-bordered table-hover table-condensed" id="ProfileHasFilterBody" style="width: 560px; table-layout: fixed; background-color: white;">
            <tbody>
                @for (int ind = 0; ind < Model.Rows.Count; ind++)
                {
                    Model.SelectedToolTabColumnID = Model.Rows[ind].SelectedToolTabColumnID;
                    <tr>
                        <td width=10%;>
                            @Html.TextBoxFor(model => Model.Rows[ind].LineNo, new { @class = "ProfileLineNo table_inputs_50 table_inputs_WithoutBox ProfileToolElemnetsChange number", @style = "height:20px", @ReadOnly = true })
                        </td>
                        <td width=42%;>
                            @Html.DropDownListFor(model => Model.SelectedToolTabColumnID, new SelectList(Model.ToolTabColumnName, "Value", "Text"), new { @class = "table_inputs_230 table_inputs_WithoutBox ProfileToolTabColumnNameDrop ProfileLineNoChangeDrop  GridElementsChange" })
                            @Html.DropDownListFor(model => Model.Rows[ind].SelectedToolTabColumnID, new SelectList(Model.ToolTabColumnName, "Value", "Text"), new { @class = "RoomGridDropHide ProfileLineNoChangeDropHide" })
                        </td>
                        <td width=16% style="text-align:center" class="ProfileCanViewDivForChange">
                            @Html.CheckBoxFor(model => Model.Rows[ind].CanView, new { @class = "table_inputs_checkbox ProfileCanView ProfileCanViewChange ProfileToolElemnetsChange GridElementsChange ProfileCheckBox" })
                        </td>
                        <td width=16% style="text-align:center" class="ProfileCanEditDivForChange">
                            @if ((Model.SelectedToolTabColumnID != 3) && (Model.SelectedToolTabColumnID != 17)
                                && (Model.SelectedToolTabColumnID != 18) && (Model.SelectedToolTabColumnID != 33)
                                && (Model.SelectedToolTabColumnID != 37) && (Model.SelectedToolTabColumnID != 41)
                                && (Model.SelectedToolTabColumnID != 113) && (Model.SelectedToolTabColumnID != 132)
                                && (Model.SelectedToolTabColumnID != 151) && (Model.SelectedToolTabColumnID != 155)
                                && (Model.SelectedToolTabColumnID != 159) && (Model.SelectedToolTabColumnID != 163)
                                && (Model.SelectedToolTabColumnID != 167) && (Model.SelectedToolTabColumnID != 171)
                                && (Model.SelectedToolTabColumnID != 186) && (Model.SelectedToolTabColumnID != 189)
                                && (Model.SelectedToolTabColumnID != 201) && (Model.SelectedToolTabColumnID != 214)
                                && (Model.SelectedToolTabColumnID != 218) && (Model.SelectedToolTabColumnID != 222)
                                && (Model.SelectedToolTabColumnID != 378) && (Model.SelectedToolTabColumnID != 390)
                                && (Model.SelectedToolTabColumnID != 403) && (Model.SelectedToolTabColumnID != 407)
                                && (Model.SelectedToolTabColumnID != 411))
                            {
                                @Html.CheckBoxFor(model => Model.Rows[ind].CanEdit, new { @class = "table_inputs_checkbox ProfileCanEdit ProfileToolElemnetsChange GridElementsChange ProfileCheckBox" })
                            }
                        </td>
                        <td width=16% style="text-align:center" class="ProfileHasFilterDivForChange">
                            @if ((Model.SelectedToolTabColumnID == 1) || (Model.SelectedToolTabColumnID == 2)
                                || (Model.SelectedToolTabColumnID == 4) || (Model.SelectedToolTabColumnID == 5)
                                || (Model.SelectedToolTabColumnID == 10) || (Model.SelectedToolTabColumnID == 11)
                                || (Model.SelectedToolTabColumnID == 12) || (Model.SelectedToolTabColumnID == 20)
                                || (Model.SelectedToolTabColumnID == 79) || (Model.SelectedToolTabColumnID == 80)
                                || (Model.SelectedToolTabColumnID == 85) || (Model.SelectedToolTabColumnID == 102)
                                || (Model.SelectedToolTabColumnID == 103) || (Model.SelectedToolTabColumnID == 106)
                                || (Model.SelectedToolTabColumnID == 111) || (Model.SelectedToolTabColumnID == 112)
                                || (Model.SelectedToolTabColumnID == 114) || (Model.SelectedToolTabColumnID == 124)
                                || (Model.SelectedToolTabColumnID == 125) || (Model.SelectedToolTabColumnID == 126)
                                || (Model.SelectedToolTabColumnID == 127) || (Model.SelectedToolTabColumnID == 187)
                                || (Model.SelectedToolTabColumnID == 188) || (Model.SelectedToolTabColumnID == 190)
                                || (Model.SelectedToolTabColumnID == 194) || (Model.SelectedToolTabColumnID == 195)
                                || (Model.SelectedToolTabColumnID == 196) || (Model.SelectedToolTabColumnID == 206)
                                || (Model.SelectedToolTabColumnID == 207) || (Model.SelectedToolTabColumnID == 318)
                                || (Model.SelectedToolTabColumnID == 361) || (Model.SelectedToolTabColumnID == 362)
                                || (Model.SelectedToolTabColumnID == 363) || (Model.SelectedToolTabColumnID == 375)
                                || (Model.SelectedToolTabColumnID == 377) || (Model.SelectedToolTabColumnID == 379)
                                || (Model.SelectedToolTabColumnID == 383) || (Model.SelectedToolTabColumnID == 384)
                                || (Model.SelectedToolTabColumnID == 385))
                            {
                                @Html.CheckBoxFor(model => Model.Rows[ind].HasFilter, new { @class = "table_inputs_checkbox ProfileHasFilter ProfileToolElemnetsChange GridElementsChange ProfileCheckBox" })
                            }
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>

